<?php echo form_open('', 'method="get" class="search_form"') ?>
<div class="search_filters">
    <div class="row">
        <div class="col-xs-12">
            <div class="input-group input-group-sm">
                <input type="text" name="q" value="<?php echo $keyword; ?>" class="form-control white search_box">
                  <span class="input-group-btn">
                    <button class="btn btn-primary" type="submit">
                        <i class="fa fa-search"></i>
                    </button>
                  </span>
            </div>
            <div class="color_picker">
                <?php $color = str_replace('#', '', $this->input->get('color')); ?>
                <div class="color_pallet"></div>
                <span class="show_hash">
                    <i data-toggle="tooltip" data-placement="top" title="Clear Color" class="fa fa-times clear_color <?php echo($color ? '' : 'hide'); ?>"></i>
                    <span class="value"><?php echo $color ? '#' . $color : ''; ?></span>
                </span>
                <input type="hidden" name="color" class="append_hash" value="<?php echo $color; ?>">
                <input type="hidden" class="html5_color" value="<?php echo $color ? '#' . $color : ''; ?>">
            </div>
        </div>
    </div>
    <div class="row m_t_10">
        <div class="col-sm-4">
            <div class="form-group">
                <?php echo form_dropdown('category', array('' => $this->language->get_text('选择分类','global')) + ($categories ? $categories : array()), $this->input->get('category'), 'class="form-control white input-sm select2" id=""'); ?>
            </div>
        </div>
        <div class="col-sm-4">
            <div class="form-group">
                <?php $time = array(
                    'all' => $this->language->get_text('所有','global'),
                    'today' => $this->language->get_text('今天','global'),
                    '7days' => $this->language->get_text('7天','global'),
                    '30days' => $this->language->get_text('30天','global'),
                    '60ays' => $this->language->get_text('60天','global'),
                ); ?>
                <?php echo form_dropdown('time', array('' => $this->language->get_text('选择时间','global')) + $time, $this->input->get('time'), 'class="form-control white input-sm select2" id=""'); ?>
            </div>
        </div>
        <div class="col-sm-4">
            <div class="form-group">
                <?php $sort = array(
                    'latest' => $this->language->get_text('最新的','global'),
                    'views' => $this->language->get_text('浏览量','global'),
                    'downloads' => $this->language->get_text('下载量','global'),
                    'favourites' => $this->language->get_text('收藏数','global'),
                    'rating' => $this->language->get_text('评分数','global'),
                ); ?>
                <?php echo form_dropdown('sort', array('' => $this->language->get_text('选择排序','global')) + $sort, $this->input->get('sort'), 'class="form-control white input-sm select2" id=""'); ?>
            </div>
        </div>
    </div>

</div>
<?php echo form_close(); ?>


<?php echo ws_load_content('contents/items', array('show_remaining_items' => true)); ?>

<?php echo $pagination; ?>